package com.lifeng.client;

import com.lifeng.bean.User;
import com.lifeng.fallback.UserServiceFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;


/**
 * Created by lifeng on 2018/4/25.
 */
@FeignClient(value="user-service-provider",fallback = UserServiceFallBack.class)
public interface UserServiceFeignClient {
    //value = "/user/{id}" 是 user-service-provider服务提供的url
    @RequestMapping(value = "/user/{id}",method = RequestMethod.GET)
    public User findById(@PathVariable("id") String id);
}
